import request from "@/utils/request";
// 查询
export const storageLocationManagement_ListAPI = (params) => {
  return request({
    url: "/base/manage/locationInfo/list",
    params,
  });
};
//添加
export const storageLocationManagement_AddAPI = (data) => {
  return request({
    url: "/base/manage/locationInfo/save",
    method: "post",
    data,
  });
};
// 修改
export const storageLocationManagement_EditAPI = (data) => {
  return request({
    method: "post",
    url: "/base/manage/locationInfo/save",
    data,
  });
};
// 删除
export const storageLocationManagement_DelAPI = (ids) => {
  return request({
    method: "delete",
    url: `/base/manage/locationInfo/del/${ids}`,
  });
};
// 导入
export const storageLocationManagement_ImportAPI = (data) => {
  return request({
    url: "/base/manage/locationInfo/importLocationInfo",
    method: "post",
    headers: { "Content-Type": "multipart/form-data" },
    data,
  });
};

// 获取库位属性数据
export const getStorageLcoal = () => {
  return request({
    url: "/base/manage/locationInfo/getAttributes",
    method: "get",
  });
};

// 保存库位属性数据
export const setStorageLcoal = (data) => {
  return request({
    url: "/base/manage/locationInfo/editAttributes",
    method: "put",
    data,
  });
};
